﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ShippingInstruction.aspx.cs"
    Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <script src="assets/js/jquery-1.4.2.js" type="text/javascript"></script>
    <link rel="stylesheet" href="assets/css/reset.css" type="text/css" />
    <link rel="stylesheet" href="assets/css/styleexpress.css" type="text/css" />
    <script src="assets/jquery/jquery.printElement.js" type="text/javascript"></script>
    <script src="assets/js/common.js" type="text/javascript"></script>
    <style type="text/css">
        .thheader
        {
            font-weight: bold;
            vertical-align: middle;
            text-align: center;
            font-size: 11px;
            border: 1px solid #ccc !important;
            line-height: 12px !important;
        }
        table.adminlist td
        {
            padding: 7px !important;
        }
        table.adminlist thead th
        {
            padding: 7px !important;
        }
        table.adminlist thead th
        {
            padding: 7px !important;
            font-weight: bold;
            vertical-align: middle;
            text-align: center;
            font-size: 11px;
            border: 1px solid #ccc !important;
            line-height: 12px !important;
        }
        .tdboder
        {
            border: none !important;
        }
        .tdboder p
        {
            padding: 1px !important;
            width: 40px;
            border: 1px solid #ccc !important;
            border-bottom: 1px solid #ccc !important;
        }
        input[type=text], input[type=password], textarea, select
        {
            border: none;
            line-height: 22px; /*width: 100% !important;*/
        }
        input[type=text]:focus, input[type=password]:focus, textarea:focus, select:focus
        {
            border-color: #4488cc;
            border-style: solid;
            border-width: 1px;
            margin: 0;
            background-color: #FCFFC5 !important;
        }
        input[type=text]:hover, input[type=password]:hover, textarea:hover, select:hover
        {
            border-color: #4488cc;
            border-style: solid;
            border-width: 1px;
            margin: 0;
            background-color: #FCFFC5 !important;
        }
        span
        {
            font-size: 12px;
        }
        .bottom td
        {
            font-weight: bold;
            text-align: center;
        }
        td.row
        {
            border-bottom: 1px solid #E9E9E9;
            height: 12px;
        }       
    </style>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#Export").click(function () {
                var vid = getUrlVars()['ID'];
                window.open("./ShippingInstruction.aspx?action=export&id=" + vid, "mywindow", "menubar=0,status=0,directories=0,resizable=1,scrollbars=1,width=720,height=500");
            });
            if (getUrlVars()['action'] == "export") {
                printElem({ overrideElementCSS: ['assets/css/print.css'] });
            }
        });
        function printElem(options) {
            $('#body-wrapper').printElement(options);

        }
    </script>
</head>
<body>
    <div id="body-wrapper">
        <div id="main-content">
            <h2>
                <%--<img src="Assets/images/Logo_Blue_text_blue.png" alt="" />--%>
            </h2>
            <div class="clear">
            </div>
            <div class="content-box">
                <form id="frmEdit" runat="server">
                <div class="content-box-header">
                    <h3 style="cursor: s-resize;">
                        Shipping Instruction
                    </h3>
                    <%if (Request.QueryString["action"] != null && Request.QueryString["action"].ToString() == "export")
                      { %>
                    <%}
                      else
                      { %>
                    <div id="action_button">
                        <input id="Button1" type="button" style="float: right; margin: 9px 10px;" class="button"
                            value="&nbsp;&nbsp;Exit&nbsp;&nbsp;" onclick="window.close()" />
                        <asp:Button class="button" ID="btnSave" Style="float: right; margin: 9px 10px;" runat="server"
                            Text="Save" OnClick="btnSave_Click" />
                        <input type="button" id="Export" class="button" runat="server" style="float: right;
                            margin: 9px 10px;" value="Export" />
                    </div>
                    <%} %>
                    <div class="clear">
                    </div>
                </div>
                <div>
                    <table class="paramlist admintable " width="100%">
                        <tr>
                            <td class="key" align="left" width="20%">
                                TO:
                            </td>
                            <td align="left" class="row">
                                <asp:Label ID="lblCARRN" runat="server"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td class="key" align="left" width="20%">
                                ATTN :
                            </td>
                            <td align="left" class="row">
                                <asp:TextBox ID="txtSIATTN" runat="server" BorderStyle="None"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="key" align="left" width="20%">
                                BOOKING NO:
                            </td>
                            <td align="left" class="row">
                                <asp:Label ID="lblMBKGNO" runat="server"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td class="key" align="left" width="20%">
                                DATE:
                            </td>
                            <td align="left" class="row">
                                <asp:Label ID="lblSIUPDATE" runat="server"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td class="key" align="left" width="20%">
                                SHIPPER :
                            </td>
                            <td align="left" class="row">
                                <asp:Label ID="lblMBLSHPR" runat="server"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td class="key" align="left" width="20%">
                                CONSIGNEE:
                            </td>
                            <td align="left" class="row">
                                <asp:Label ID="lblMBLCNEE" runat="server"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td class="key" align="left" width="20%">
                                NOTIFY PARTY:
                            </td>
                            <td align="left" class="row">
                                <asp:Label ID="lblMBLNTF" runat="server"></asp:Label>
                            </td>
                        </tr>
                    </table>
                    <table cellspacing="0" cellpadding="0" width="100%" border="0" class="adminlist"
                        style="margin-top: 5px;">
                        <tr style="background: #ECECEC;">
                            <td class="thheader">
                                VSSL<%--Tên con tàu--%>
                            </td>
                            <td class="thheader">
                                VOY No<%--Số chuyến tàu--%>
                            </td>
                            <td class="thheader">
                                POL<%--Cảng chất hàng--%>
                            </td>
                            <td class="thheader">
                                DEST.<%--Cảng đến--%>
                            </td>
                        </tr>
                        <tr onmouseover="this.style.background='#dbf0c9'" onmouseout="this.style.background='#ffffff'">
                            <td align="center">
                                <asp:Label ID="txtVSSL" runat="server" Width="85%"></asp:Label>
                            </td>
                            <td align="center">
                                <asp:Label ID="txtVOYNO" runat="server" Width="85%"></asp:Label>
                            </td>
                            <td align="center">
                                <asp:Label ID="txtPOLID" runat="server" Width="85%"></asp:Label>
                            </td>
                            <td align="center">
                                <asp:Label ID="txtDESTID" runat="server" Width="85%"></asp:Label>
                            </td>
                        </tr>
                    </table>
                    <asp:Repeater ID="rptShippingDetail" runat="server">
                        <ItemTemplate>
                            <tr onmouseover="this.style.background='#dbf0c9'" onmouseout="this.style.background='#ffffff'">
                                <td align="center">
                                    <%# DataBinder.Eval(Container.DataItem, "Index")%>
                                    <asp:HiddenField ID="txtID" runat="server" Value='<%# DataBinder.Eval(Container.DataItem, "ID")%>'>
                                    </asp:HiddenField>
                                </td>
                                <td align="center">
                                    <asp:Label ID="txtCONT" runat="server" Width="98%" Text='<%# DataBinder.Eval(Container.DataItem, "CONT")%>'
                                        CssClass="clsPol"></asp:Label>
                                </td>
                                <td align="center">
                                    <asp:Label ID="txtSEAL" runat="server" Width="98%" Text='<%# DataBinder.Eval(Container.DataItem, "SEAL")%>'
                                        CssClass="clsPod"></asp:Label>
                                </td>
                                <td align="center">
                                    <asp:Label ID="txtContType" CssClass="txtContType" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "ContType")%>'></asp:Label>
                                </td>
                                <td align="center">
                                    <asp:Label ID="txtVOL" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "VOL")%>'></asp:Label>
                                </td>
                                <td align="center">
                                    <asp:Label ID="txtPKGS" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "PKGS")%>'></asp:Label>
                                </td>
                                <td align="center">
                                    <asp:Label ID="txtGW" runat="server" CssClass='<%#Eval("ID").ToString()==""?"addnew-buyprice":"" %>'
                                        Text='<%# DataBinder.Eval(Container.DataItem, "GW")%>'></asp:Label>
                                </td>
                                <td align="center">
                                    <asp:Label ID="txtMEAS" runat="server" CssClass='<%#Eval("ID").ToString()==""?"addnew-buypriceinvoice":"" %>'
                                        Text='<%# DataBinder.Eval(Container.DataItem, "MEAS")%>'></asp:Label>
                                </td>
                                <td align="center">
                                    <asp:Label ID="txtTEMP" runat="server" CssClass='<%#Eval("ID").ToString()==""?"addnew-sellprice":"" %>'
                                        Text='<%# DataBinder.Eval(Container.DataItem, "TEMP")%>'></asp:Label>
                                </td>
                            </tr>
                        </ItemTemplate>
                        <HeaderTemplate>
                            <table cellspacing="0" cellpadding="0" width="100%" border="0" class="adminlist"
                                style="margin-top: 5px;">
                                <thead>
                                    <tr>
                                        <th align="center" class="thheader">
                                            Index
                                        </th>
                                        <th align="center" class="thheader">
                                            CONT.<%--Số container--%>
                                        </th>
                                        <th align="center" class="thheader">
                                            SEAL<%--Số chì--%>
                                        </th>
                                        <th align="center" class="thheader">
                                            TYPE<%--Loại container--%>
                                        </th>
                                        <th align="center" class="thheader">
                                            VOL<%--Loại container--%>
                                        </th>
                                        <th align="center" class="thheader">
                                            PKGS<%--Quy cách đong hàng--%>
                                        </th>
                                        <th align="center" class="thheader">
                                            G.W (KGS)<%--Tổng trọng lượng--%>
                                        </th>
                                        <th align="center" class="thheader">
                                            MEAS. (CBM)<%--Số khối--%>
                                        </th>
                                        <th align="center" class="thheader">
                                            TEMP.( Degree)<%--Nhiệt độ--%>
                                        </th>
                                    </tr>
                                </thead>
                        </HeaderTemplate>
                        <FooterTemplate>
                            <tr class="bottom">
                                <td colspan="3">
                                    Total
                                </td>
                                <td>
                                    <%= ShippingDetail.GetGroupCatContType(long.Parse(Request.QueryString["ID"].ToString())) %>
                                </td>
                                <td>
                                    <%=spdVOL_Sum.ToString()%>
                                </td>
                                <td>
                                </td>
                                <td>
                                    <%=spdGW_Sum.ToString("#,#.##")%>
                                </td>
                                <td>
                                    <%=spdMEAS_Sum.ToString("#,#.##")%>
                                </td>
                                <td>
                                </td>
                            </tr>
                        </FooterTemplate>
                    </asp:Repeater>
                    <table cellspacing="0" cellpadding="0" width="100%" border="0" class="paramlist admintable">
                        <tr style="background: #ECECEC;">
                            <td style="text-align: left;">
                                DESCRIPTION OF GOODS, MARKS & NUMBERS<%--Diễn giải hàng hóa:--%>
                            </td>
                        </tr>
                        <tr onmouseover="this.style.background='#dbf0c9'" onmouseout="this.style.background='#ffffff'">
                            <td style="text-align: left;">
                                <asp:Label ID="txtDOGMN" runat="server" TextMode="MultiLine" Rows="6" Width="85%"></asp:Label>
                            </td>
                        </tr>
                    </table>
                    <table class="paramlist admintable " width="100%">
                        <tr>
                            <td class="key" align="left">
                                PAYMENT TERM:
                            </td>
                            <td align="left" class="row">
                                <asp:Label ID="lblTOP" runat="server"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <asp:TextBox ID="txtSICOMMENT" runat="server" Text="PLEASE ISSUE DRAFT TO CHECK"
                                    Width="80%" BorderStyle="None"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="key" align="left">
                                Noted:
                            </td>
                            <td align="left" class="row">
                                <asp:TextBox ID="txtSINOTED" runat="server" Text="" Width="80%" BorderStyle="None"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2" align="left">
                                <%--FOR BACH VIET SHIPPING CO., LTD--%>
                            </td>
                        </tr>
                    </table>
                </div>
                </form>
            </div>
        </div>
    </div>
</body>
</html>
